<?php
// +----------------------------------------------------------------------
// | title: 武将升星日志
// +----------------------------------------------------------------------
// | Author: TZ.Leong
// +----------------------------------------------------------------------
// | Date: 2019/11/18 14:41
// +----------------------------------------------------------------------

$heroArr = getDiffConfig("hero");
$heroConf[-999] = "-=武将名称=-";
foreach($heroArr as $id => $vo){
    $heroConf[$id] = $vo["name"];
}
return array(
    1 => array(
        "title" => "武将置换日志",
        'table_name' => "hero_exchange",
        "where" => array(
            'role_id' => array('name' => '玩家ID','type' => 'text','value' => ''),
            'role_name' => array('name' => '角色名','type' => 'text','value' => ''),
            'old_hero_id|new_hero_id' => ['name' => '武将', 'type' => 'select', 'values' => $heroConf, 'value' => '-999', 'class' => 'chosen_select'],
            'log_time' => array('name' => '时间','type' => 'date','values' => array('start_date' => date('Y-m-d'),'end_date' => date('Y-m-d'))),
        ),
        "where_merge" => [],
        'show' => array(
            'log_time' => array("时间","function" => "changeDate"),
            'role_id' => '玩家ID',
            'role_name' => '角色名',
            'old_hero_id' => array("放入消耗武将","function" => "itemName","param" => ['field' => 'old_hero_id', 'config' => 'hero', 'config_field' => 'name']),
            'new_hero_id' => array("生成随机武将","function" => "itemName","param" => ['field' => 'new_hero_id', 'config' => 'hero', 'config_field' => 'name']),
        )
    ),
);